package com.lzs.bootsafety.common.oss;

import com.lzs.bootsafety.business.oss.entity.SysFile;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
/**
 *  @author  zhanshi Liu
 *  @date    2020/04/19
 *  @website www.jhmsona.cn
 *
 */public interface FileApi {
    /**
     * 文件上传
     * @param file
     * @return
     */
    SysFile uploadFile(MultipartFile file);

    SysFile uploadFile(File file);

    SysFile uploadFile(InputStream is, String key);

    boolean download(String fileName);

    boolean delete(String filePath);
}
